home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / graphics / library / wgt51_r2.zip / WGT5 / H / WLINK.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-03  |  1.4 KB  |  74 lines

  1. #ifndef _WLINK_
  2. #define _WLINK_
  3.  
  4. /* 
  5.    WordUp Graphics Toolkit V5.0  Communications Routines
  6. */
  7.  
  8. #ifdef __cplusplus
  9.   extern "C" {
  10. #endif
  11.  
  12.  
  13. #define WLINK_NOVECTOR 0x67
  14. #define WLINK_8250_UART 0
  15. #define WLINK_16550_UART 1
  16.  
  17. #define BUFFERSIZE      4096
  18. /* BUFFERSIZE must be a power of 2 */
  19.  
  20.  
  21. /* Buffer for input and output */
  22. typedef struct
  23. {
  24.  short head, tail;           // bytes are put on head and pulled from tail
  25.  short size;
  26.  unsigned char data[BUFFERSIZE];
  27. } transferbuffer;
  28.  
  29. extern transferbuffer buffer_in, buffer_out;
  30.  
  31.  
  32. extern short uart_type;
  33. extern short irqintnum;
  34. extern short line_status;
  35.  
  36. /* Modem variables */
  37. extern short pulsedial;
  38. extern short usemodem;
  39.  
  40. extern struct {
  41.   char modem_init [257];
  42.   char modem_hangup [257];
  43.   unsigned long baud_rate;
  44.   short com_port;
  45.   short irq_num;
  46.   short uart;
  47.   short uarttype;
  48.   short vector;
  49.  } link_info;
  50.  
  51.  
  52.  
  53. /* Communication Routines */
  54. void wlink_flush_incoming (void);
  55. void wlink_flush_outgoing (void);
  56. void wlink_getuart (void);
  57. void wlink_getvector (void);
  58. void wlink_initport (void);
  59. void wlink_shutdownport (void);
  60. void wlink_write_buffer (char *buffer, unsigned int count);
  61.  
  62. void wlink_modemcommand (char *str);
  63. void wlink_hangup_modem (void);
  64. int wlink_modemresponse (char *resp);
  65. void wlink_initmodem (void);
  66. int wlink_dial (char *dialstring);
  67. int wlink_answer (void);
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif
  74.